from django.shortcuts import render
from django.views import View
from django_redis import get_redis_connection
# Create your views here.

from .fengkong_spider import RiskInfo
from utils.json_func import to_json_data


class RiskView(View):

    def get(self, request):
        url = 'https://www.tianyancha.com/usercenter/watch'
        risk = RiskInfo()
        risk.run(url)
        return to_json_data(errno='')